package com.idna.wsconsumer.cxf.dispatch;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.transform.dom.DOMSource;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Service;

/**
 * This is a java client implemented using the Dispatch approach
 *  
 * @author kan.sun
 *
 */
public class CXFDispatchClient
{
	//URL wsdlURL = new URL("http://xml.192.com/NetID.cfc?wsdl");
	/*Create a Dispatch object*/
	
	//Create a Service object to represent the wsdl:service element 
	//defining the service on which the Dispatch will make invocations 
	QName serviceName = new QName("NetIDService");
	Service s = Service.create(serviceName);
	
	QName portName = new QName("NetID.cfc");
	
	//Create the Dispatch object using the Service object's createDispatch() method
	Dispatch<DOMSource> dispatch = s.createDispatch(portName, DOMSource.class, Service.Mode.PAYLOAD);
	
	/*Construct a request message*/
	
	/*Call the proper invoke() method*/
	
	/*Parse the response message*/
}
